package com.summer.springboot.ch3;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * Created by thinkpad on 2018/7/8.
 */
public class Ch3Main {

    public static void main(String[] args) {

        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(TaskExecutorConfig.class);
        AsyncTaskService service = context.getBean(AsyncTaskService.class);
        for (int i = 0; i < 10; i++) {
            service.executeAsyncTask(i);
            service.executeAsyncTaskPlus(i);
        }

        context.close();

    }

}
